import axios from 'axios'

export default class {

    //添加合同信息
    Addlaber(laber,projectId,providerId,empId){
        return axios.get(`http://localhost/smj_laber`,{
            params:{
                'create_date':laber.create_date,
                'contract_name':laber.contract_name,
                'p_id':projectId,
                'contract_type':laber.contract_type,
                'contract_amount':laber.contract_amount,
                'start_date':laber.start_date,
                'amount_upper':laber.amount_upper,
                'end_date':laber.end_date,
                'labor_org_id':providerId,
                'settle_type':laber.settle_type,
                'advance_pay':laber.advance_pay,
                'deposit_amount':laber.deposit_amount,
                'payment_type':laber.payment_type,
                'contract_signatory':empId,
                'pay_condition':laber.pay_condition,
                'main_term':laber.main_term,
                'comment':laber.comment,
                'attach_ids':laber.attach_ids,
            }
        })
    }

    //添加工程量清单
    AddWorkList(tenderPurchaseDetails,id){
        return axios.get(`http://localhost/smj_laber/labor_work_list`,{
            params:{
                'work_content':tenderPurchaseDetails.work_content,
                'unit':tenderPurchaseDetails.unit,
                'work_count':tenderPurchaseDetails.work_count,
                'unit_price':tenderPurchaseDetails.unit_price,
                'id':id ,
            }
        })
    }

    //提交审批
    FlowLaber(laber){
        return axios.post(`http://localhost/smj_laber/Flow_laber`,laber)
    }

    //添加文件附录信息
    UpdateInfo(ids,infoname){
        return axios.get(`http://localhost/smj_laber/UpdateInfo`,{
            params:{
                'ids':ids,
                'infoname':infoname,
            }
        })
    }

    //获取工程量清单
    getWorkList(id){
        return axios.get(`http://localhost/smj_laber/getWorkList`,{
            params:{
                'id':id
            }
        })
    }

    //获取审批流程
    getfromaudit(id){
        return axios.get(`http://localhost/smj_laber/getfromaudit`,{
            params:{
                'id':id
            }
        })
    }
    
}